enum dtype_user_define {
	TYPE(USER_DEFINE)=0x3200
};
enum subtype_user_define {
	SUBTYPE(USER_DEFINE,LOGIN)=0x1,
	SUBTYPE(USER_DEFINE,CLIENT_STATE),
	SUBTYPE(USER_DEFINE,SERVER_STATE),
	SUBTYPE(USER_DEFINE,RETURN)
};

enum enum_role_type
{
	SYSADMIN=0x01,
    SECADMIN,
    AUDITADMIN,
    REMOTEADMIN,
    USER=0x11,
	REMOTEUSER
};

enum enum_user_state
{
	INIT=0x01,
	WAIT,
    LOGIN,
    LOGOUT,
    CONNECT,
    LOGERROR=0x11,
    LOGLOCKED,
    LOGUNLOCKED
};

enum enum_login_result
{
	SUCCEED=0x01,
    PROCEED,
	CONNONLY,
    NOUSER=0x11,
    AUTHFAIL,
    LOCKED,
    NOACCESS
};

typedef struct user_define_login{
	char * name;
	UINT32 role;
	BYTE passwd[32];
	BYTE node_uuid[32];
}__attribute__((packed)) RECORD(USER_DEFINE,LOGIN);

typedef struct user_define_client_state{
	char * name;
	UINT32 role;
	UINT32 user_state;
	char * user_info;
}__attribute__((packed)) RECORD(USER_DEFINE,CLIENT_STATE);

typedef struct user_define_server_state{
	char * name;
	BYTE node_uuid[32];
	char proc_name[32];
	char * passwd;
	UINT32 role;
	UINT32 user_state;
	char * user_info;
}__attribute__((packed)) RECORD(USER_DEFINE,SERVER_STATE);

typedef struct user_define_return{
	UINT32 return_code;
	char * return_info;
}__attribute__((packed)) RECORD(USER_DEFINE,RETURN);

